 

import java.util.List;

import javax.annotation.Resource;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import com.zsCat.web.sys.model.SysResource;
import com.zsCat.web.sys.service.SysResourceService;
import com.zsCat.web.test.model.TestUser;
import com.zsCat.web.test.service.TestUserService;

@ContextConfiguration(locations = { "classpath*:/spring-config.xml" })
@RunWith(SpringJUnit4ClassRunner.class)
public class TestServiceTest1 {

	
	@Resource
	SysResourceService  sysResourceService;
	@Resource
	TestUserService  TestUserService;
	@Test
	public void transferTest() throws Exception {
		SysResource record1=new SysResource();
		//record1.setParentid(0L);
		//record1.setIcon("fa fa-cogs");
		//record1.setId(194L);
//		List<SysResource> pRes=sysResourceService.select(record1);
//		System.out.println(pRes);
		
		for(int i=0;i<999;i++){
			TestUser t=new TestUser();
			t.setNickname("name"+i);
			t.setPassword("password"+i);
			t.setUsername("username"+i);
			TestUserService.insertSelective(t);
		}
	}
	
	public static void main(String[] args) {
		for(int i=0;i<1000;i++){
		//	System.out.println((int)(Math.random()*10000));
		}
		
	}
}
